package ddd.ajava.chapter4.question1;

import java.util.Scanner;

public class AnnoTest {
	public static void main(String[] args) {
		PersonAction pa=null;
		Person person=null;
		PersonAction pa2=null;
//		pa2.process(person);
		Scanner sc=new Scanner(System.in);
		
		while(true){
			System.out.println("操作提示：输入请键入1，显示请键入2,退出请键入3");
			int num=sc.nextInt();
			switch(num){
			case 1:
				pa=new PersonInput();
				person=pa.process(new Person());
				break;
			case 2:
				pa2=new PersonDisplay();
				pa2.process(person);
				break;
			case 3:
				System.exit(0);
				break;
			}
		}
	}
}
